/**
 * @param {number[]} A
 * @param {number} m
 * @param {number[]} B
 * @param {number} n
 * @return {void} Do not return anything, modify A in-place instead.
*/
var merge = function(A, m, B, n) {
  let index = m;
  for(let i = 0; i < B.length; i++) {
    A[index++] = B[i];
  }
  A.sort((a, b) => a - b);
};
let A = [1,2,3,0,0,0], m = 3, B = [2,5,6], n = 3;
merge(A, m, B, n);
console.log(A);
